package com.kanq.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kanq.mapper.KanqAiHistoryQuestionMapper;
import com.kanq.pojo.entity.KanqAiHistoryQuestion;
import com.kanq.service.KanqAiHistoryQuestionService;
import org.springframework.stereotype.Service;

/**
 * @author wangchong
 * @description 针对表【kanq_ai_history_question】的数据库操作Service实现
 * @createDate 2025-06-04 14:18:09
 */
@Service
public class KanqAiHistoryQuestionServiceImpl extends ServiceImpl<KanqAiHistoryQuestionMapper, KanqAiHistoryQuestion>
        implements KanqAiHistoryQuestionService {

    @Override
    public Long saveQuestion(String question, Long titleId) {
        KanqAiHistoryQuestion questionEntity = new KanqAiHistoryQuestion();
        questionEntity.setContent(question);
        questionEntity.setHistoryId(titleId);
        this.save(questionEntity);
        return questionEntity.getHistoryQuestionId();
    }
}




